﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace iLangl.LanguageWire.DAL.LanguageWireDAL.MockupStorage
{
	public class MockupSyncrhonizationDAL : MockupBaseDAL, ISynchronizationDAL
	{
		public void InsertJobToSync(int jobId)
		{
			foreach (dtoMockupStorage.TranslationRow tr in Storage.Translation)
			{
				if (jobId == tr.TPIdentity)
				{
					tr.IsToSync = true;
					return;
				}
			}
		}

		public void RemoveJobFromSync(int jobId)
		{
			foreach (dtoMockupStorage.TranslationRow tr in Storage.Translation)
			{
				if (jobId == tr.TPIdentity)
				{
					tr.IsToSync = false;
					return;
				}
			}
		}

		public Int32[] GetJobsToSync(byte[] timestamp)
		{
			List<Int32> result = new List<int>();

			//TODO: Implement mockup synchronization
			foreach (dtoMockupStorage.TranslationRow tr in Storage.Translation)
			{
			}
			return result.ToArray();
		}


		

		public void MarkJobsAsSynced(SyncedDataLW synceddata)
		{
			//TODO: Implement mockup synchronization
		}


		public SyncedDataLW GetJobsToSync()
		{
			throw new NotImplementedException();
		}
	}
}
